package com.molin.threadTest.threadSecurety.blockcode;

public class Demo1 {
    public static void main(String[] args) {
        //卖票问题
        Ticket ft=new Ticket();
        Thread thread1=new Thread(ft);
        Thread thread2=new Thread(ft);
        Thread thread3=new Thread(ft);

        thread1.setName("售票窗口一");
        thread2.setName("售票窗口二");
        thread3.setName("售票窗口三");
        thread1.start();thread2.start();thread3.start();
    }
}
